<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterTableCustomerCouponsAddColumnCappedAmount extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('customer_coupons', function (Blueprint $table) {
            $table->unsignedInteger('cappedAmount')->default(0)->comment('折扣券上限金额')->after('discount');
            $table->unsignedTinyInteger("isExpireNotice")->default(0)->comment('是否到期提醒 0：否 1：是');
            $table->unsignedTinyInteger("isArrivalNotice")->default(0)->comment('是否到账提醒 0：否 1：是');
            $table->unsignedTinyInteger("expireNoticeDay")->default(0)->comment('到期提前几天提醒');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
